package com.hnkywl.sts.entity.sfgl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.jhgl.Jkd;
import com.hnkywl.sts.entity.sys.Pm;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 统配资金计划明细
 * Created with IntelliJ IDEA.
 * User: ZHUCHG
 * Date: 13-4-2
 * Time: 上午11:52
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "T_BIZ_SFKMX")
@Where(clause = "deleted !='1'")
public class Sfkmx extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqSfkmx", allocationSize = 1, sequenceName = "SEQ_BIZ_SFKMX")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqSfkmx")
    private Long id;
    // 付款单
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "FKSH_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Sfk fksh;

    // 付款日期
    private Date fkrq;

    // 本次付款（金额）
    private Double bcfkmx = 0d;

    // 付款审核明细
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "JKD_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Jkd jkd;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getFkrq() {
        return fkrq;
    }

    public void setFkrq(Date fkrq) {
        this.fkrq = fkrq;
    }

    public Sfk getFksh() {
        return fksh;
    }

    public void setFksh(Sfk fksh) {
        this.fksh = fksh;
    }

    public BigDecimal getBcfkmx() {
        BigDecimal bigDecimal = new BigDecimal(bcfkmx==null?0:bcfkmx);
        return bigDecimal;
    }

    public void setBcfkmx(Double bcfkmx) {
        this.bcfkmx = bcfkmx;
    }

    public Jkd getJkd() {
        return jkd;
    }

    public void setJkd(Jkd jkd) {
        this.jkd = jkd;
    }
}
